package lab02.test26;

import java.util.Scanner;
public class ExceptionTest {
    public static void main(String[] args) {
        int cout1 = 0;
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入除数：");
        int cout2 = scanner.nextInt();
        int result = 0;
        try {
            result = cout2 / cout1;
        }
        catch (ArithmeticException e){
            e.printStackTrace();
        }
        finally {
            System.out.println("输入异常！！！");
        }
        System.out.println("相除的结果为：" + result);
    }
}
